<?php


namespace App\Admin\Controllers\Api;

use App\Admin\Repositories\User;
use Illuminate\Http\Request;

class AddressController
{


    public function index(Request $request)
    {
        $parents_code = $request->input('q') == 0 ? '' : $request->input('q'); // 父级code，为空时获得全部省

        $addressInfo = User::getAddressByPrentsCode($parents_code);
        return $addressInfo;
    }

}